package cn.airia.as3wplib.rpc
{
	public class DelegateFactory
	{
		public function DelegateFactory()
		{
		}
		public static const  TYPE_WEBSERVICE:String = "webService";
		public static const  TYPE_HTTPSERVICE:String = "httpServie";
		public static const  TYPE_XMLMOCKSERVICE:String = "xmlMockService";
		public static const  TYPE_XMLRPC:String = "xmlrpc";
		
		public static function getDelegate(type:String,targetUrl:String):BaseServiceDelegate
		{
			if(type == TYPE_WEBSERVICE)
			{
				return null;				
			}
			if(type == TYPE_HTTPSERVICE)
			{
				return null;
			}
			if(type == TYPE_XMLMOCKSERVICE)
			{
				return null;
			}
			if(type == TYPE_XMLRPC)
			{
				return new XmlrpcServiceDelegate(targetUrl);
			}
			else
			{
				return null;
			}
		}
	}
}